package org.example.back.mapper.health;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.back.entity.health.ChronicDisease;

import java.util.List;

@Mapper
public interface ChronicDiseaseMapper {
    // 插入慢性病记录
    void insertChronicDisease(ChronicDisease chronicDisease);

    // 根据用户ID查询所有慢性病记录
    List<ChronicDisease> findChronicDiseasesByUserId(@Param("userId") Integer userId);

    // 根据ID查询慢性病记录
    ChronicDisease findChronicDiseaseById(@Param("id") Integer id);

    // 更新慢性病记录
    void updateChronicDisease(ChronicDisease chronicDisease);

    // 删除慢性病记录
    void deleteChronicDisease(@Param("id") Integer id);
}